package cn.gok.oa.util;

import java.io.File;
import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLDecoder;

public class GetPath {
    /**
     * 获取工程本地
     */
    public static String getUserDirectoryPath() {
        URL url = GetPath.class.getClassLoader().getResource("");
        try {
            File file = new File(url.getFile() + "/static/image");
            file.mkdirs();
            return URLDecoder.decode(url.getFile() + "static/image", "utf8");
        } catch (UnsupportedEncodingException e) {
            return url.getFile();
        }
    }
}
